import { get, post } from '../../request'

const ns = '/monitor'

export const monitorApi = {
  /**
   * 查询服务器信息
   */
  findServer: () => {
    return get({ url: `${ns}/server` })
  },

  /**
   * 查询在线用户
   */
  findOnlineUser: (params: any) => {
    return get({ url: `${ns}/online`, params })
  },

  /**
   * 强退登录用户
   * @param token token
   * @returns
   */
  logoutOnlineUser: (token: string) => {
    return post({ url: `${ns}/online/logout/${token}` })
  }
}
